//== SAGITTARIUS ============================================================================

//== BEGINNING OF CODE ===============================================================

#include "sagittarius/core/SagittariusCore.h"
#include "sagittarius/io/io.h"
#include <stdio.h>
#include <math.h>

void sg_write(int fd, void* buf, size_t nbytes) {
    FILE* f;
    switch(fd) {
        case 1:
            f = stdout;
            break;
        case 2:
            f = stderr;
            break;
        default:
            AN(0, "Invalid file descriptor");
            return;
    }
    fwrite(buf, 1, nbytes, f);
}
